<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head></h:head>
<body>
	<f:view>
		
		<br />
		<h:form>
		      <h:outputText id="msg" value="#{ajaxBean.errMessage}"
            style="color: red" />
			<h3>请输入名称</h3>
			<h:inputText name="userName" value="#{ajaxBean.name}" />
			<h3>请输入邮箱</h3>
			<h:inputText name="email" id="idmail" value="#{ajaxBean.email}">
				<f:ajax event="blur" render="msg" listener="#{ajaxBean.checkMail}"></f:ajax>
			</h:inputText>
			<h:commandButton action="#{ajaxBean.gotoServlet()}" value="submit" />
		</h:form>
	</f:view>

</body>
</html>
